 package org.edu.modules.portal.service.impl;

 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import java.io.Serializable;
 import java.util.Map;
 import org.edu.modules.portal.entity.VeSite;
 import org.edu.modules.portal.mapper.VeSiteMapper;
 import org.edu.modules.portal.service.IVeSiteService;
 import org.edu.modules.pub.entity.VeFileImage;
 import org.edu.modules.pub.service.IVeFileImageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;







 @Service
 public class VeSiteServiceImpl
   extends ServiceImpl<VeSiteMapper, VeSite>
   implements IVeSiteService
 {
   @Autowired
   private VeSiteMapper veSiteMapper;
   @Autowired
   private IVeFileImageService veFileImageService;

   public Map<String, Object> getMapById(Serializable id) {
/* 32 */     return this.veSiteMapper.selectMapById(id);
   }

   @Transactional
   public Boolean updateById(VeSite veSite, VeFileImage bannerImg, VeFileImage logoImg) {
     int bid = 0, lid = 0;
/* 38 */     if (!bannerImg.getSourcefile().isEmpty()) {
/* 39 */       bid = this.veFileImageService.saveForDeal(bannerImg).intValue();
     }
     if (!logoImg.getSourcefile().isEmpty()) {
/* 42 */       lid = this.veFileImageService.saveForDeal(logoImg).intValue();
     }
/* 44 */     veSite.setBannerid(Integer.valueOf(bid));
     veSite.setLogoid(Integer.valueOf(lid));
/* 46 */     return Boolean.valueOf((this.veSiteMapper.updateById(veSite) > 0));
   }
 }



